package cn.springcloud.fix.gateway.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    @GetMapping(value = "/test")
    public String test() {
        throw new RuntimeException();
        // return "SUS";
    }

    @GetMapping("/timeout")
    public String timeout() {
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("休眠了2秒");
        return "timeout test";
    }
}
